/*******************************************************************************
 * Copyright 2011-2013 Sergey Tarasevich
 * <p/>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p/>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p/>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package common.db;

/**
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 */
public final class Constants {

    public static final int ACCESS_TOKEN_KICKED = 5;
    public static final int UNFRIENDYOU = 2; //解除关系
    public static final String APP_DIR = "askdr";
    public static int Staff = -99;

    //相片
    public static final String PhotoSelected_AllImages = "all_images";

    public static final String PhotoSelected_CurrentPosition = "currentPosition";

    public static final String PhotoSelected_MaxAllowSelectNumber = "max_allow_select_Number";

    public static final String PhotoSelected_SelectedImages = "Selected_Image_List";


    public static final String ImageBucket_ParamName = "imageBucket";

    public static final String PATIENT_LOGIN_INFO = "patient_login_config";


    public static final String USER_INFO = "user_info";
    public static final String DEPARTID = "DEPARTID";
    public static final String DEPARTNAME = "DEPARTNAME";
    public static final String HOSPITALID = "HOSPITALID";
    public static final String HOSPITALNAME = "HOSPITALNAME";

    public static final String PATIENT = "patient";

    public static final String TAG = "TAG";
    public static final String IS_NEW_ADD = "IS_NEW_ADD";
    public static final String PROFILE_PIC_ID = "PROFILE_PIC_ID";

    public static final String VIPBANK = "VIPBANK";
    public static final String DOCTOR = "doctor";
    public static final String PROVINCELIST = "PROVINCELIST";

    public static final String STORAGE_UPLOAD = "upload";
    public static final String STORAGE_DOWNLOAD = "download";
    public static final String REGISTER = "register";

    public static final String IMAGE_BUCKET_PARAM_NAME = "imageBucket";

    public static final String PHOTO_SELECTED_MAX_ALLOW_SELECT_NUMBER = "max_allow_select_Number";
    public static final String PHOTO_SELECTED_SELECTED_IMAGES = "Selected_Image_List";
    public static final String PHOTO_SELECTED_ALL_IMAGES = "all_images";
    public static final String PHOTO_SELECTED_CURRENT_POSITION = "currentPosition";

    public static final String FILTER_ACTION_TO_CHAT_SESSIION = "action_to_chatsession";
    //过滤聊天室
    public static final String FILTER_ACTION_TO_CHATROOM_SESSIION = "action_to_chatroom_session";
    public static final String LANGUAGE = "zh";

    public static final int SYNC_TIMEOUT = 60 * 1000;
    public static final int REQUEST_TIMEOUT = 60 * 1000;

    public static final int GET_LIST = 332;//获取新列表

    /* Server return value*/

    //TODO Chang 10-05 没有一个地方检查 SERVER ERROR？
    public static final int SERVER_ERROR = 0;

    public static final int LOCAL_ERROR = -1;
    public static final int SERVER_SUCCESS = 1;


    public static final String PARAM_TARGET_FRAGMENT = "__param_target_fragment";
    public static final String PARAM_BUNDLE_PARAM = "__param_bundle_param";


    //All Error Constants go here
    public static class Error {
        public static final int NETWORK_IS_UNREACHABLE = 10001;//网络不可用

        public static final int XMPP_CONNECTION_ERROR = 1001;
        public static final int XMPP_LOGIN_ERROR = 1002;
        public static final int MEDIA_UPLOAD_ERROR = 1101;
        public static final int MEDIA_DOWNLOAD_ERROR = 1102;
    }

    public static class Chat {

        public static final int CHAT_LOGIN_STATE_NEW = 0;
        public static final int CHAT_LOGIN_STATE_STARTED = 1;
        public static final int CHAT_LOGIN_STATE_SUCCESS = 2;
        public static final int CHAT_LOGIN_STATE_ERROR = 3;

        public static final int CHAT_NEW_MESSAGE = 100;
        public static final int CHAT_OFFLINE_MESSAGE = 101;
        public static final int CHAT_MESSAGE_SENT = 102;
        public static final int CHAT_MESSAGE_RESENT = 103;
        public static final int CHAT_MESSAGE_RECEIVED = 104;
        public static final int CHAT_MESSAGE_CHANGED = 105;
        public static final int CHAT_MESSAGE_REPLACE = 106;

        public static final int CHAT_MESSAGE_DOWNLOAD_MEDIA = 300;

        public static final int CHAT_DIRECTION_SEND = 1;
        public static final int CHAT_DIRECTION_RECEIVE = 2;

        public static final int CHAT_MESSAGE_TYPE_TEXT = 1;
        public static final int CHAT_MESSAGE_TYPE_IMAGE = 2;
        public static final int CHAT_MESSAGE_TYPE_AUDIO = 3;
        public static final int CHAT_MESSAGE_TYPE_VIDEO = 4;

        public static final int CHAT_FILE_UPLOAD = 1;
        public static final int CHAT_FILE_DOWNLOAD = 2;

        public static final String CHAT_SESSION = "chat_session";
        public static final String CHATROOM_SESSION = "chatroom_session";
        public static final String CHAT_MESSAGE = "chat_message";
        public static final String CHAT_MEDIA = "media";
        public static final String CHAT_BODY = "body";
        public static final String CHAT_FROM_SERVER = "server";
        public static final long CHAT_FROM_SERVER_ID = -9999;

        public static final String CHAT_LAST_MSG_IMAGE_TEXT = "[图片]";
        public static final String CHAT_LAST_MSG_AUDIO_TEXT = "[语音]";
        public static final String CHAT_LAST_MSG_VIDEO_TEXT = "[视频]";

        public static final int CHAT_UPLOAD_TIMEOUT = 120 * 1000;

        //1. 发送状态  2.接受成功 3.离线状态 4.数据丢失 5.发送状态 6.发送失败
        public static final int CHAT_SEND_STATUS_NA = 0;
        public static final int CHAT_SEND_STATUS_SENT = 1;
        public static final int CHAT_SEND_STATUS_RECEIVED = 2;
        public static final int CHAT_SEND_STATUS_OFFLINE = 3;
        public static final int CHAT_SEND_STATUS_LOST = 4;
        public static final int CHAT_SEND_STATUS_BLOCKED = 5;
        public static final int CHAT_SEND_STATUS_UPLOAD_FAILED = 6;

        public static final int CHAT_MESSAGE_CODE_OFFLINE = 1;
        public static final int CHAT_MESSAGE_CODE_NOFOUND = 2;
        public static final int CHAT_MESSAGE_CODE_BLOCKED = 3;

        public static final String CHAT_IMAGE_THUMBNAIL = "thumbnailImageId";
        public static final String CHAT_IMAGE_OBJECT_ID = "objectId";
        public static final String CHAT_IMAGE_ATTACHFILE = "attachFile";
        public static final int CHAT_IMAGE_STYLE_LARGE = 1; //"large";
        public static final int CHAT_IMAGE_STYLE_RAW = 2; //"raw";

        public static final String CHAT_MIME_TYPE_IMAGE = "image/jpeg";
        public static final String CHAT_MIME_TYPE_AMR = "audio/amr";
        public static final String CHAT_MIME_TYPE_MP3 = "audio/mp3";
        public static final String CHAT_MIME_TYPE_MP4 = "video/mp4";
        public static String GROUPCHAT = "groupchat";
    }

    public static class Http {

        public static final String HTTP_MESSAGE_TYPE_TEXT = "text";
        public static final String HTTP_MESSAGE_TYPE_IMAGE = "image";
        public static final String HTTP_MESSAGE_TYPE_AUDIO = "audio";
        public static final String HTTP_MESSAGE_TYPE_VIDEO = "video";
        public static final String HTTP_MESSAGE_TYPE_CHATROOM = "chatroom";

        public static final String HTTP_IMAGE_STYLE_LARGE = "large"; //1
        public static final String HTTP_IMAGE_STYLE_RAW = "raw"; //2
        //Download image type
        public static final int HTTP_DOWNLOAD_IMAGE_NO = 0;
        public static final int HTTP_DOWNLOAD_IMAGE_THUMBNAIL = 1;
        public static final int HTTP_DOWNLOAD_IMAGE_COMPRESSED = 2;
        public static final int HTTP_DOWNLOAD_IMAGE_ORGINAL = 3;

    }


    public static class Relation {
        public static final int CREATE_RELATION = 1;//服务器返回关系改变的type
        public static final int RELEASE_RELATION = 2;//服务器返回关系改变的type

        public static final String RELATION_CODE_RELEASED_WAIT = "1";//等待确认
        public static final String RELATION_CODE_NORMAL_TEXT = "2";//正常关系
        public static final String RELATION_CODE_RELEASE_TEXT = "4";//主动解除
        public static final String RELATION_CODE_RELEASED_TEXT = "3";//被动解除


        //        public static final String RELATION_CODE_NORMAL_TEXT = "1";//正常关系
//        public static final String RELATION_CODE_RELEASE_TEXT = "2";//主动解除关系
//        public static final String RELATION_CODE_RELEASED_TEXT = "3";//被动解除关系
//        1-待确认
//        2-已接受，
//        3-已忽略,
//        4.已删除
        public static final int RELATION_CODE_NORMAL = 1;//正常关系
        public static final int RELATION_CODE_RELEASE = 2;//主动解除关系
        public static final int RELATION_CODE_RELEASED = 3;//被动解除关系

        public static final String RELATION = "relation";
        public static final int MONEY_NOT_ENOUGH = 322;//余额不足抵扣月费

    }


    public static class Counts {
        public static String NEW_NOTICE_COUNT = "new_notice_count";
        public static String NEW_RELATION_COUNT = "new_relation_count";
        public static String NEW_INVITED_PATIENT_COUNT = "new_invited_patient_count";
        public static String NOTICE = "notice";

        //医生版计数消息
        public static final int MSG_NEW_VIP_PATIENT = 606;

        public static String NEW_PATIENT_FLAG = "%$#@*!#$%^";

        //患者版计数消息
        public static final int MSG_NEW_NOTICE = 650;
        public static final int MSG_NEW_NOTICE_PATIENT = 651;
        public static final int MSG_NEW_RELATION_PATIENT = 652;
        public static final int MSG_INIT_NOTICE_COUNT_PATIENT = 653;////新公告计数清零，通知SessionFragment公告小红点消失
    }


    public static class Selected {
        public static final int ISSELECTED = 1;
        public static final int ISNOTSELECTED = 2;
        public static final int DELETE = 3;
    }

    public static final int DELETE_CLICK = 3;
    public static final String SELECT = "SELECT";
}
